package buco.integrity.trigger;

import org.json.simple.JSONObject;

import buco.core.api.SemanticConstraint;

public class RegisterTrigger extends SemanticConstraint {

	private String event; 
	private String packageName;
	private String message;
	
	@Override
	protected void deserialize(JSONObject jsonObject) throws Exception {
		event = jsonObject.get("event").toString();			
		message = jsonObject.get("message").toString();
		if(jsonObject.get("packageName") != null) { 
			packageName = jsonObject.get("packageName").toString();
		}		
	}

	public String getEvent() {
		return event;
	}
	
	public String getPackageName() {
		return packageName;
	}

	public String getMessage() {
		return message;
	}
}
